﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

public partial class Calibration_CalibrationRecord : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    protected void Button1_Click2(object sender, EventArgs e)
    {
        Session["item"] = this.DropDownList1.SelectedValue.ToString();
        if (this.TextBox3.Text.Trim() == "")
        {
            if (this.TextBox1.Value.Trim() == "" && this.TextBox2.Value.Trim() == "")
            {
                Session["startTime"] = DateTime.Parse("1946-1-1 00:00:00");
                Session["stopTime"] = DateTime.Parse(DateTime.Now.ToString());
                Session["InID"] = "%";

            }
  
            else
            {

                Session["startTime"] = DateTime.Parse(this.TextBox1.Value.Trim());
                Session["stopTime"] = DateTime.Parse(this.TextBox2.Value.Trim());
                Session["InID"] = "%";

            }

        }
        else 
        {
            if (this.TextBox1.Value.Trim() == "" && this.TextBox2.Value.Trim() == "")
            {
                Session["startTime"] = DateTime.Parse("1946-1-1 00:00:00");
                Session["stopTime"] = DateTime.Parse(DateTime.Now.ToString());
                Session["InID"] = this.TextBox3.Text.Trim();

            }
            else
            {

                Session["startTime"] = DateTime.Parse(this.TextBox1.Value.Trim());
                Session["stopTime"] = DateTime.Parse(this.TextBox2.Value.Trim());
                Session["InID"] = this.TextBox3.Text.Trim();

            }
        
        
        }


        if (this.DropDownList1.SelectedValue.ToString() == "交调")
        {

            Response.Redirect("~/Calibration/CalibrationDetails/intermodulation.aspx");
        }
        else
        {
            Response.Redirect("~/Calibration/CalibrationDetails/electricalProperties.aspx");

        }
    }
}
